<template>
  <p v-once>{{msg}}</p>  <!--msg不会改变-->
  <p>{{msg}}</p>
  <p>
    <input type="text" v-model = "msg" name="">
    </p>
</template>

<script>
import { reactive, toRefs } from 'vue'

export default {
  setup () {
    const state = reactive({
      msg: 'hello'
    })

    return {
      ...toRefs(state)
    }
  }
}
</script>